home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS in a Box 7
/
BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso
/
Files
/
Prog
/
Q-R
/
RR⁄Tabby Source Code.cpt
/
Import 2.55.source
< prev
next >
Wrap
Text File
|
1990-05-25
|
57KB
|
1,923 lines
' Code by: Mike Lininger
' 385 Bowling Green Place
' Gahanna, Ohio 43230
' (614) 471-6209 (BBS)
5-25-90
I am making most of my code available to anyone interested in developing
their own Second Sight/Tabby utilities. This source is not designed to be
compiled and run. It is missing key functions and pieces of code that are
Copyright me and others, that are not to be released at this time.
This code is for example purposes only. It illustrates various ways of reading
writing and process data from a variety of SS/Tabby files. It illustrates
the use of Block Reads and Indexes amoung other things.
If you use any portion of this code you must abide by two rules, or you
void the agreement that I am making with you and are subject what the law
dictates.
They are simple.
1. If you us any of this code you must give Michael Lininger and Lininger
Technology credit in both the program and the documentation.
2. It is agreed I am to receive a free copy of the program whether it is
free, sharware or commercial.
Now you must read on a little further and we will be done.
A little history on why I choose ZBasic as the root for my utilities.
I use to be one of those people that would smirk every time someone mentioned
they were using BASIC (until 3 years ago I and others had ever right to
smirk) and would say how nice. But thought yeh! Real programmers only use
C or Assembler.
Then came along Microsofts QuickBasic for the IBM. This baby was hot
it gave you all features of C and Pascal, plus core logic of Assembler,
all packaged into a neat super easy to learn and use package. This cut out
months of development work plus the finial applications were a hell of a lot
better looking, cause you could do so much in a short period of time.
This set the tide for a new generation of Basic's. Zedcor introduced ZBasic
for the mac, which gave complete control over the toolbox plus it compiled
into nice neat assembly and was fast.
ZBasic I have found to be extremely powerful and fast, in most cases it
matches or out performs the best C compilers out there. Now when someone
says heh I finished this great C project that I have been working on for 6
months, I now smirk and say how nice. But think yeh! I could have done
the same thing in 1/4 the time and saved you 300,000.00 and ended up with
a lot cleaner and more professional looking product all at the cost of an
extra 14k of file size.
The only draw back to ZBasic is it lack of Data structures, but this is
made up for the use of Indexes. C programmer salivate all over the place
at the mention of theses babies. They give you performance you never dreamed
of. Now of we could just get Zedcor to give us a dozen more, WOW.
Moral of the story - DO NOT EVER underestimate the POWER of Compiled Basic.
Have at it. I hope a lot of people will use this as a jumping off point
and dive into creating a flood of new SS/Tabby utilities.
I can be reached on the networks if you have questions.
614-471-6209 9600 baud
614-471-5733 2400 baud
M.Lininger Genie
Mike Lininger FidoNet (Tabby, RRH, MANSION echoes)
Mike Lininger 1:226/200
Mike Lininger via cmhGate - Net 226 fido<=>uucp gateway Col, OH
UUCP: ...!ous-cis!n8emr!cmhgate!200.2!Mike.Lininger
INET: Mike.Lininger@p2.f200.n226.z1.FIDONET.ORG
' This baby is a little old and reflects, see export for block reads
' Code is in ZBasic 5.0
' Settings 8,2,4,5,50,mklt,TEXT,LONG,Space Req. after Keywords
'
' Start date: 03-01-89
' Last modify date: 02-24-90
' Version: 2.55 includes AreaFix
' Import Module for Tabby 2.0
' MKLi - Creator
' TImp - Type
' To Prevent your application from say "You will not be able to print"
' if it does not find a Print Driver in your system do the following
' on the finial campiled application. DO NOT DO IT ON ZBASIC ITSELF.
' Use FEDIT do a Hex search for 50EDFD3C and change 50ED to FD3C.
' Sets up application. Turns off Startup Window, Sets Default Mouse
WINDOW OFF
COORDINATE WINDOW
FLUSHEVENTS
DIM T%,L%,B%,R%,MY%,MX%: ' Must be dimensioned for toolbox calls
DIM 1 Bit$(10): ' Storage area for Message Status Byte
DIM 1 MessageSection$(255): ' Storage area 1 byte for 255 message sections
DIM 1 UserFlag$(2000): ' MessageFlag bit - to alert user he has mail waiting
DIM 32 User$(2000): ' Holds user First and Last Name or comparision
DIM 80 Tabby$(100): ' Lanuch Sequence for rest of tabby chain
DIM 26 MsgName$(255): ' Holds Section Names
DIM MsgCount%(255): ' Holds import count for that section
Field%=1:ERROR=0:Cur%=128:AreaFixFlag%=0
' Upper/Lower Case Function
LONG FN LCASE$(Sting$)
FOR x%=2 TO LEN(Sting$)
a%=PEEK(VARPTR(Sting$)+x%)
IF (a%>64) AND (a%<91) AND k%=0 THEN a%=a%+32
IF a%=32 THEN k%=1 ELSE k%=0
POKE VARPTR(Sting$)+x%,a%
NEXT x%
END FN=Sting$
' convert string resource to a string, handle must be passed to this function
LONG FN ReturnString$(SHndl&)
FByte%=PEEK(PEEK LONG(SHndl&))
String$=""
FOR I%=1 TO FByte%
String$=String$+CHR$(PEEK(PEEK LONG(SHndl&)+I%))
NEXT I%
END FN = String$
' This function turns a Pascal-encoded string into ZBasic-usable form
DEF FN MakeString$(String$) = MID$(String$, 2, ASC(LEFT$(String$,1)))
WND=1:GOSUB "Build_Main_Window"
GOSUB "Cursor_Spin"
' Loads starting values and pathnames from Str Resource file
GOSUB "Get_Resource_Values"
HighMessage&=OldHighMessage&
GOSUB "Cursor_Spin"
' Checks to see if mouse key is down, if so then goto configure menu
MOUSE ON
DEF MOUSE = 0
Hold%=MOUSE(3)
LONG IF Hold% <> 0
GOSUB "Cursor_Spin"
DEF MOUSE = -1
WINDOW CLOSE #1
GOSUB "Configure Menu"
IF rscs%=1 THEN rscs%=0:CALL CLOSERESFILE(Refnum%)
CURSOR 0
END
END IF
MOUSE OFF
DEF MOUSE = -1
GOSUB "Cursor_Spin"
IF LEN(BBSFolder$) <=1 THEN BBSFolder$=""
GenericFile$=BBSFolder$+"Generic"
MessagesFile$=BBSFolder$+"Messages"
ConfigFile$=BBSFolder$+"Config"
Userlog$=BBSFolder$+"UserLog"
IF RRHost$="" THEN RRHost$="Red Ryder Host"
RRHost$=BBSFolder$+RRHost$
TabbyNet$=BBSFolder$+"TabbyNet"
NextLaunch$=BBSFolder$+"Launch.Next"
AreaFix$=BBSFolder$+AreaFix$
AreaFixFile$=BBS$+"AreaFix.req"
' Checks for valid file names and paths
GOSUB "Get_File_Info"
StartTime$=TIME$+" "+DATE$+" Import Start"
PerMinuteStart&=TIMER: ' Staring time for calculation of Msgs processed per minute
StartTime&=TIMER
' Initialize local variables
ImportCount&=0
EchoCount&=0
NetCount&=0
BarOffSet%=19
BatchCount&=0
MsgCount&=0
DeleteCount&=0
BytesToProcess&=MsgTxtBytes&-(MessageOffSet&+MessageLength&): 'Bytes already processed
GOSUB "Cursor_Spin"
ScreenLine$="* Importing Messages *"
GOSUB "Screen_Log_Display"
' Initialize values on Process Control Screen
TEXT 4,12,,
CALL MOVETO(225,35):PRINT USING "###,###";HighMessage&
CALL MOVETO(225,51):PRINT USING "###,###";LowMessage&
CALL MOVETO(225,67):PRINT USING "###,###";OldHighMessage&
CALL MOVETO(225,99):PRINT USING "###,###";ImportCount&
CALL MOVETO(225,115):PRINT USING "###,###";MessageNumber&
CALL MOVETO(225,131):PRINT USING "###,###";BatchCount&
CALL MOVETO(225,162):PRINT USING "###,###";0
GOSUB "Cursor_Spin"
"Import_Routine"
a$=GenericFile$:er$="G1"
ON ERROR GOSUB "File_Error_Trap"
OPEN "N",5,GenericFile$
a$=MsgHdrFilename$:er$="H1"
OPEN "N",1,MsgHdrFilename$,206
a$=MsgTxtFilename$:er$="T1"
OPEN "A",2,MsgTxtFilename$
a$=UserLog$:er$="U1"
OPEN "N",6,UserLog$,136
DO
DIALOG ON
DIALOG OFF
a$=GenericFile$:er$="G2"
LengthHold&=0
MsgCount&=MsgCount&+1
LINE INPUT #5,RecordFlag$
Byte1$=LEFT$(RecordFlag$,1)
Byte2$=MID$(RecordFlag$,2,1)
Byte3$=RIGHT$(RecordFlag$,1)
LONG IF UCASE$(Byte1$) = "D"
LengthHold&=LengthHold&+4
DeleteCount&=DeleteCount&+1
"Message_Skip"
LINE INPUT #5,hold$
LengthHold&=LengthHold&+LEN(hold$)+1
IF hold$=CHR$(0) THEN GOTO "Next_Message"
GOTO "Message_Skip"
END IF
ImportCount&=ImportCount&+1
Position&=LOC(5):Rec%=REC(5)
NewPosition&=Position&-4
RECORD #5,Rec%,NewPosition&
PRINT #5,"D";
RECORD #5,Rec%,Position&
LINE INPUT #5,Catagory$
MessageSection%=VAL(Catagory$)
LINE INPUT #5,MessageDate$
ActualMonth$=LEFT$(MessageDate$,2):ActualMonth%=VAL(ActualMonth$)
ActualDay$=MID$(MessageDate$,4,2):ActualDay%=VAL(ActualDay$)
ActualYear$=RIGHT$(MessageDate$,2):ActualYear%=VAL(ActualYear$)
LINE INPUT #5,MessageTime$
ActualHour1$=LEFT$(MessageTime$,2):ActualHour%=VAL(ActualHour1$)
ActualMinute1$=MID$(MessageTime$,4,2):ActualMinute%=VAL(ActualMinute1$)
ActualSecond1$=RIGHT$(MessageTime$,2):ActualSecond%=VAL(ActualSecond1$)
Month1$=LEFT$(DATE$,2):Month%=VAL(Month1$)
Day1$=MID$(DATE$,4,2):Day%=VAL(Day1$)
Year1$=RIGHT$(DATE$,2):Year%=VAL(Year1$)
Hour1$=LEFT$(TIME$,2):Hour%=VAL(Hour1$)
Minute1$=MID$(TIME$,4,2):Minute%=VAL(Minute1$)
Second1$=RIGHT$(TIME$,2):Second%=VAL(Second1$)
LINE INPUT #5,Node$
l%=LEN(Node$)
MessageDestination$=Node$
LINE INPUT #5,MessageFrom$
LINE INPUT #5,MessageTo$
LINE INPUT #5,MessageSubject$
LONG IF RIGHT$(MessageTo$,2) = "^P"
l%=LEN(MessageTo$)
MessageTo$=LEFT$(MessageTo$,l%-2)
MessageSection%=EMailArea&
END IF
LONG IF RIGHT$(MessageSubject$,2) = "^P"
l%=LEN(MessageTo$)
MessageSubject$=LEFT$(MessageSubject$,l%-2)
MessageSection%=EMailArea&
END IF
IF MessageSection%=0 THEN MessageSection%=NetMailArea&
LONG IF MessageSection% = NetMailArea&
NetCount& = NetCount&+1
XELSE
EchoCount& = EchoCount&+1
END IF
MsgCount%(MessageSection%) = MsgCount%(MessageSection%)+1
LengthHold&=LengthHold&+30+LEN(MessageFrom$)+LEN(MessageTo$)+LEN(MessageSubject$)
' checks for messages addressed to Sysop or System Operator
LONG IF UCASE$(MessageTo$) = "SYSOP" OR UCASE$(MessageTo$) = "SYSTEM OPERATOR"
MessageTo$=SysopName$
END IF
' checks for AREAFIX Request
LONG IF LEFT$(UCASE$(MessageTo$),7)="AREAFIX" AND b5%=2
Null$=CHR$(0)
GOSUB "AreaFix"
GOTO "Screen_Update"
END IF
' converts To and From into Upper/Lower Case Syntax
MessageFrom$ = FN LCASE$(MessageFrom$)
MessageTo$ = FN LCASE$(MessageTo$)
MessageUserHold$=MessageTo$
HighMessage&=HighMessage&+1
MessageNumber&=HighMessage&
RecordCount&=RecordCount&+1
Rct&=RecordCount&
MessageOffSet&=MsgTxtBytes&
ReplyMessageNumber&=0
MessageLength&=0
Null$=CHR$(0)
"MessageBody"
LINE INPUT #5,ln$
LONG IF ln$=Null$ AND MessageLength&=0
Hold$=CHR$(6)
a$=MsgTxtFilename$:er$="T2"
PRINT #2,Hold$;
Hold$=" "
PRINT #2,Hold$;
MsgTxtBytes&=MsgTxtBytes&+7
MessageLength&=7
GOSUB "Message_Record_Write_Conversion"
GOSUB "Message_Record_Write"
GOSUB "User_Check"
GOTO "Next_Message"
END IF
LONG IF ln$=Null$
GOSUB "Message_Record_Write_Conversion"
GOSUB "Message_Record_Write"
GOSUB "User_Check"
GOTO "Next_Message"
XELSE
l%=LEN(ln$)
Hold$=CHR$(l%)
a$=MsgTxtFilename$:er$="T3"
PRINT #2,Hold$;
PRINT #2,ln$;
MsgTxtBytes&=MsgTxtBytes&+1+l%
MessageLength&=MessageLength&+1+l%
GOTO "MessageBody"
END IF
ON ERROR RETURN
"Next_Message"
GOSUB "Cursor_Spin"
' Update Stats on Process Window
"Screen_Update"
IF UCASE$(Byte1$)="D" THEN DeleteCount&=DeleteCount&+1
' Updates Graph on Process Window
PEN,,1,9,3
BatchCount&=BatchCount&+MessageLength&+LengthHold&
bar%=200*BatchCount&/ImportByteSize&
IF bar% >=240 THEN bar%=239
BOX FILL BarOffSet%+12,250-bar% TO BarOffSet%+1,250
CALL PENNORMAL
PerMinuteCompute!=(TIMER-PerMinuteStart&)
MsgPerMin%=BatchCount&/PerMinuteCompute!
CALL MOVETO(225,99):PRINT USING "###,###";ImportCount&
CALL MOVETO(225,115):PRINT USING "###,###";MessageNumber&
CALL MOVETO(225,131):PRINT USING "###,###";BatchCount&
CALL MOVETO(225,162):PRINT USING "###,###";MsgPerMin%
UNTIL EOF(5)
CALL MOVETO(364,244):PRINT TIME$
"Finished_Exports"
FinishTime&=TIMER
' Make sure process graph ends at 100%
PEN,,1,9,3
bar% = 240
BOX FILL BarOffSet%+12,250-bar% TO BarOffSet%+1,250
CALL PENNORMAL
CLOSE #1,2,5,6
GOSUB "Cursor_Spin"
ScreenLine$="Deleting Generic Import File"
GOSUB "Screen_Log_Display"
a$=GenericFile$:er$="GD"
ON ERROR GOSUB "File_Error_Trap"
KILL GenericFile$
ON ERROR RETURN
ScreenLine$="Updating Messages File"
GOSUB "Screen_Log_Display"
GOSUB "Cursor_Spin"
a$=MessagesFile$:er$="M1"
ON ERROR GOSUB "File_Error_Trap"
OPEN "N",1,MessagesFile$,9242
ON ERROR RETURN
GOSUB "Write_Messages_File"
CLOSE #1
' Dumps report information to the ImExport Log
"Log_Dump"
GOSUB "Cursor_Spin"
LONG IF b4%=2
ax&=EchoCount&+NetCount&+DeleteCount&
' Opens Import Export Log file and Time Stamps it
DEF OPEN "TEXTTmkl"
a$=ImExportLog$:er$="L1"
ON ERROR GOSUB "File_Error_Trap"
OPEN "A",88,ImExportLog$
LONG IF b3%=2
GOSUB "Cursor_Spin"
PRINT #88, StartTime$
PRINT #88, USING "########";ax&;:PRINT #88," Messages Scanned"
PRINT #88, USING "########";ImportCount&;:PRINT #88," Messages Imported"
PRINT #88, USING "########";EchoCount&;:PRINT #88," Echo Messages Imported"
PRINT #88, USING "########";NetCount&;:PRINT #88," NetMail Messages Imported"
PRINT #88, USING "########";DeleteCount&;:PRINT #88," Deleted Mail NOT Imported"
PRINT #88, USING "########";BatchCount&;:PRINT #88," Total Bytes Imported"
PRINT #88, USING "########";(FinishTime&-StartTime&);:PRINT #88," Elapsed Time (Seconds)"
PRINT #88, USING "########";MsgPerMin%;:PRINT #88," Bytes Processed Per/Sec"
PRINT #88, USING "########";OldHighMessage&;:PRINT #88," Starting Message Number"
PRINT #88, USING "########";HighMessage&;:PRINT #88," Ending Message Number"
IF AreaFixFlag%=255 THEN PRINT #88, USING "########";AreaFixCount%;:PRINT #88," AreaFix Requests"
FOR j%= 1 TO 255
LONG IF MsgCount%(j%) <> 0
PRINT #88, USING "########";MsgCount%(j%);
IF MsgName$(j%)="" THEN MsgName$(j%)="Inactive Area"
PRINT #88, " ";:PRINT #88,MsgName$(j%)
END IF
NEXT j%
PRINT #88,TIME$;" ";DATE$;" Import Finish"
PRINT #88,"---------------"
GOSUB "Cursor_Spin"
XELSE
PRINT #88,USING "####";ImportCount&;" Messages Imported in ";
PRINT #88,USING "####";(FinishTime&-StartTime&);" seconds at ";TIME$;" ";DATE$
END IF
CLOSE #88
ON ERROR RETURN
GOSUB "Cursor_Spin"
END IF
' Updates the high message #, that was last processed by this routine
' Write new High Message Number to STR 1225 in STR Resource.
GOSUB "Cursor_Spin"
ScreenLine$="Updating Last Message #"
GOSUB "Screen_Log_Display"
default$=STR$(HighMessage&)
default$=RIGHT$(default$,LEN(default$)-1)
ResourceCount%=1225
StrHnd&=FN GETRESOURCE(CVI("STR "),ResourceCount%)
CALL SETSTRING(StrHnd&,default$)
CALL CHANGEDRESOURCE(StrHnd&)
CALL UPDATERESFILE(Refnum%)
GOSUB "Cursor_Spin"
GOSUB "Tabby_Launch"
GOSUB "Tabby_Launch_Error"
END
"AreaFix"
TEXT 0,12,0,0
T%=128:L%=306:B%=144:R%=453:Temp$="AreaFix Req."
CALL TEXTBOX(VARPTR(Temp$)+1,LEN(Temp$),T%, 1)
TEXT 4,,: ' • Monoco. Plain, 12pt
AreaFixFlag%=255
AreaFixCount%=AreaFixCount%+1
DEF OPEN "TEXTQED1"
OPEN "A",3,AreaFixFile$
PRINT #3,RecordFlag$
PRINT #3,Catagory$
PRINT #3,MessageDate$
PRINT #3,MessageTime$
PRINT #3,Node$
PRINT #3,MessageFrom$
PRINT #3,MessageTo$
PRINT #3,MessageSubject$
"AreaLoop"
LINE INPUT #5,xln$
MessageLength&=MessageLength&+1+LEN(xln$)
PRINT #3,xln$
LONG IF xln$=Null$
CLOSE #3
RETURN
END IF
GOTO "AreaLoop"
"User_Check"
' Checks to see if a MessageTo is addressed to a real users on the
' board. If so then that users Message flag is set, so next time
' he logs in he will be notified of the message waiting.
FOR u%= 0 TO UserCount%
LONG IF UCASE$(MessageUserHold$)=UCASE$(User$(u%)) AND UserFlag$(u%)="0"
UserFlag$(u%)="1"
UserRct%=u%
GOSUB "UserLog_Write"
u%=UserCount%+99
END IF
NEXT u%
RETURN
"Message_Record_Write"
' This module writes the record to the MSGHDR file, for the new message
a$=MessagesFile$:er$="M2"
ON ERROR GOSUB "File_Error_Trap"
RECORD #1,Rct&
WRITE #1,MessageStatus$;1
WRITE #1,Reserved1$;1
WRITE #1,MessageNumber&
WRITE #1,MessageSection$;1
WRITE #1,Reserved2$;1
WRITE #1,Month$;1
WRITE #1,Day$;1
WRITE #1,Year$;1
WRITE #1,Hour$;1
WRITE #1,Minute$;1
WRITE #1,Second$;1
WRITE #1,FromCount$;1
WRITE #1,MessageFrom$;31
WRITE #1,ToCount$;1
WRITE #1,MessageTo$;31
WRITE #1,SubjectCount$;1
WRITE #1,MessageSubject$;41
WRITE #1,DestinationCount$;1
WRITE #1,MessageDestination$;67
WRITE #1,MessageOffSet&
WRITE #1,MessageLength&
WRITE #1,ReplyMessageNumber&
WRITE #1,ActualMonth$;1
WRITE #1,ActualDay$;1
WRITE #1,ActualYear$;1
WRITE #1,ActualHour$;1
WRITE #1,ActualMinute$;1
WRITE #1,ActualSecond$;1
ON ERROR RETURN
GOSUB "Cursor_Spin"
RETURN
"Message_Record_Write_Conversion"
' This module takes the information read in from the Tabby import file
' and converts it into a format acceptable to RRH 2.0
FOR cnt%=0 TO 7
Bit$(cnt%)="0"
NEXT cnt%
LONG IF MessageSection%=11
Bit$(5)="1"
END IF
Bit$(1)="1": ' Flag as Tabby processed
Reserved1$=MKI$(0)
Reserved2$=MKI$(0)
l%=LEN(MessageFrom$)
LONG IF l% > 31
MessageFrom$=LEFT$(MessageFrom$,31)
END IF
l%=LEN(MessageTo$)
LONG IF l% > 31
MessageTo$=LEFT$(MessageTo$,31)
END IF
l%=LEN(MessageDestination$)
LONG IF l% > 67
MessageDestination$=LEFT$(MessageDestination$,67)
END IF
l%=LEN(MessageSubject$)
LONG IF l% > 41
MessageSubject$=LEFT$(MessageSubject$,41)
END IF
BitHold$=""
FOR j% = 0 TO 7
BitHold$=BitHold$+Bit$(j%)
NEXT j%
BitHold$="&X"+"00000000"+BitHold$
MessageStatus%=VAL(BitHold$)
MessageStatus$=MKI$(MessageStatus%):MessageStatus$=RIGHT$(MessageStatus$,1)
MessageSection$=MKI$(MessageSection%):MessageSection$=RIGHT$(MessageSection$,1)
Month$="":Month$=MKI$(Month%):Month$=RIGHT$(Month$,1)
Day$="":Day$=MKI$(Day%):Day$=RIGHT$(Day$,1)
Year$="":Year$=MKI$(Year%):Year$=RIGHT$(Year$,1)
Hour$="":Hour$=MKI$(Hour%):Hour$=RIGHT$(Hour$,1)
Minute$="":Minute$=MKI$(Minute%):Minute$=RIGHT$(Minute$,1)
Second$="":Second$=MKI$(Second%):Second$=RIGHT$(Second$,1)
ActualMonth$=MKI$(ActualMonth%):ActualMonth$=RIGHT$(ActualMonth$,1)
ActualDay$=MKI$(ActualDay%):ActualDay$=RIGHT$(ActualDay$,1)
ActualYear$=MKI$(ActualYear%):ActualYear$=RIGHT$(ActualYear$,1)
ActualHour$=MKI$(ActualHour%):ActualHour$=RIGHT$(ActualHour$,1)
ActualMinute$=MKI$(ActualMinute%):ActualMinute$=RIGHT$(ActualMinute$,1)
ActualSecond$=MKI$(ActualSecond%):ActualSecond$=RIGHT$(ActualSecond$,1)
FromCount%=LEN(MessageFrom$)
FromCount$=MKI$(FromCount%):FromCount$=RIGHT$(FromCount$,1)
MessageFrom$=LEFT$(MessageFrom$,FromCount%)
ToCount%=LEN(MessageTo$)
ToCount$=MKI$(ToCount%):ToCount$=RIGHT$(ToCount$,1)
MessageTo$=LEFT$(MessageTo$,ToCount%)
SubjectCount%=LEN(MessageSubject$)
SubjectCount$=MKI$(SubjectCount%):SubjectCount$=RIGHT$(SubjectCount$,1)
MessageSubject$=LEFT$(MessageSubject$,SubjectCount%)
DestinationCount%=LEN(MessageDestination$)
DestinationCount$=MKI$(DestinationCount%):DestinationCount$=RIGHT$(DestinationCount$,1)
MessageDestination$=LEFT$(MessageDestination$,DestinationCount%)
RETURN
"Write_Messages_File"
' This module updates the MESSAGE file with the new High/Low message
' numbers and the total bytes in the MSGTXT file.
a$=MessagesFile$:er$="M3"
ON ERROR GOSUB "File_Error_Trap"
RECORD #1,0,50
WRITE #1,LowMessage&
WRITE #1,HighMessage&
WRITE #1,MsgTxtBytes&
ON ERROR RETURN
RETURN
"UserLog_Read"
' This module reads in a user record and stores user name and message
' flag status in an array. This enables quick ram userlog searches and
' updates only when necessary with UserLog_Write. 2000 max. users in
' this source.
a$=UserLog$:er$="U2"
ON ERROR GOSUB "File_Error_Trap"
RECORD #6,UserRct%
READ #6,FirstName$;16
READ #6,LastName$;16
READ #6,Junk$;62
READ #6,MessageFlag$;1
READ #6,Junk2$;41
ON ERROR RETURN
MessageFlag%=CVI(MessageFlag$)
LONG IF MessageFlag%=0
MFlag$="0"
XELSE
MFlag$="1"
END IF
FirstName$=FN MakeString$(FirstName$)
LastName$=FN MakeString$(LastName$)
User$(UserRct%) = FirstName$+" "+LastName$
UserFlag$(UserRct%)=MFlag$
RETURN
"UserLog_Write"
' This module updates the Userlog message flag for individual users
' that they have mail waiting, when they login next time to the BBS.
MessageFlag$=MKI$(1)
MessageFlag$=RIGHT$(MessageFlag$,1)
ON ERROR GOSUB "File_Error_Trap"
a$=UserLog$:er$="U3"
RECORD #6,UserRct%,94
WRITE #6, MessageFlag$;1
ON ERROR RETURN
RETURN
"Config_File_Read_Convert"
GOSUB "Cursor_Spin"
LONG IF ASC(LEFT$(MsgPath$,1))>0
MessagesFile$=FN MakeString$(MsgPath$)+":MESSAGES"
XELSE
MessagesFile$="MESSAGES": ' Default location
END IF
LONG IF ASC(LEFT$(CallerLog$,1))>0
CallerLog$=FN MakeString$(CallerLog$)+":CallerLog"
XELSE
CallerLog%=255: ' No CallerLog file being used, so can't write to it
END IF
LONG IF ASC(LEFT$(UserLog$,1))>0
UserLog$=FN MakeString$(UserLog$)+":UserLog"
XELSE
UserLog$="UserLog": ' Default location where export is
END IF
LONG IF ASC(LEFT$(SysopName$,1))>0
SysopName$=FN MakeString$(SysopName$)
XELSE
SysopName$="System Operator"
END IF
RETURN
"Tabby_Launch"
GOSUB "Cursor_Spin"
EventCount%=0:ERROR=0
ON ERROR GOSUB "AreaFix_Launch_Error"
LONG IF AreaFixFlag%=255
RUN AreaFix$
END IF
ON ERROR RETURN
"PrepareNextLaunch"
EventCount%=0:ERROR=0
DEF OPEN "TEXTQED1"
ScreenLine$="Checking for Launch.Next File"
GOSUB "Screen_Log_Display"
OPEN "R",1,NextLaunch$
Length&=LOF(1,1)
CLOSE #1
LONG IF Length&=0
ScreenLine$="File Not Found "+NextLaunch$
GOSUB "Screen_Log_Display"
ErrLine$ = "<<Error 01>> *"+NextLaunch$+"* Does not Exist at end of Indicated Path! "
GOSUB "Error Log"
KILL NextLaunch$
GOTO "Launch_Sequence_Start"
END IF
ScreenLine$="Loading Event Chain"
GOSUB "Screen_Log_Display"
OPEN "I",1,NextLaunch$
WHILE NOT EOF(1)
GOSUB "Cursor_Spin"
INPUT #1,Tabby$(EventCount%)
EventCount%=EventCount%+1
WEND
CLOSE #1
GOSUB "Cursor_Spin"
EventCount%=EventCount%-1
T%=128:L%=306:B%=144:R%=453:Temp$=Tabby$(0)
CALL TEXTBOX(VARPTR(Temp$)+1,LEN(Temp$),T%, 1)
LONG IF EventCount% < 1
ScreenLine$="Last Event Deleting Launch.Next "
GOSUB "Screen_Log_Display"
KILL NextLaunch$
XELSE
ScreenLine$="Updating Launch.Next File "
GOSUB "Screen_Log_Display"
GOSUB "Cursor_Spin"
OPEN "O",1,NextLaunch$
FOR Count%= 1 TO EventCount%
PRINT #1,Tabby$(Count%);
GOSUB "Cursor_Spin"
LONG IF Tabby$(Count%+1) = ""
PRINT #1,CHR$(13);
XELSE
PRINT #1,",";
END IF
NEXT Count%
CLOSE #1
END IF
"Launch_Sequence_Start"
LaunchFile$=BBSFolder$+Tabby$(0)
IF UCASE$(Tabby$(0))="BBS" THEN LaunchFile$=RRHost$
GOSUB "Check_Valid_Filenames"
ON ERROR GOSUB "Tabby_Launch_Error"
LONG IF Tabby$(0) <> ""
GOSUB "Cursor_Spin"
ScreenLine$="Launching - "+LaunchFile$
GOSUB "Screen_Log_Display"
CURSOR 0
LONG IF FileErr1%=255
ScreenLine$="File Not Found - "+LaunchFile$
GOSUB "Screen_Log_Display"
ErrLine$ = "<<Error 02>> *"+LaunchFile$+"* Does not Exist at end of Indicated Path! "
GOSUB "Error Log"
ErrLine$ = " "+"Attempt is being Made to Run *"+RRHost$+"* "
GOSUB "Error Log"
ScreenLine$="Launching BBS - "+RRHost$
GOSUB "Screen_Log_Display"
LONG IF FileErr2%=0
ScreenLine$="BBS Not Found - "+RRHost$
GOSUB "Screen_Log_Display"
ErrLine$ = "<<Error 03>> "+RRHost$+" Does not Exist at end of Indicated Path! "
GOSUB "Error Log"
ErrLine$ = " "+"Attempt is being Made to Run *"+TabbyNet$+"* "
GOSUB "Error Log"
ScreenLine$="Launching TabbyNet - "+TabbyNet$
GOSUB "Screen_Log_Display"
LONG IF FileErr3%=255
ScreenLine$="TabbyNet Not Found - "+TabbyNet$
GOSUB "Screen_Log_Display"
ErrLine$ = "<<Error 04>> *"+TabbyNet$+"* Does not Exist at end of Indicated Path! "
GOSUB "Error Log"
GOSUB "Tabby_Launch_Error"
END
XELSE
RUN TabbyNet$
END
END IF
XELSE
RUN RRHost$
END
END IF
XELSE
RUN LaunchFile$
END
END IF
XELSE
CURSOR 0
ScreenLine$="Last Event Launching BBS - "+RRHost$
GOSUB "Screen_Log_Display"
LONG IF FileErr2%=255
ScreenLine$="BBS Not Found - "+RRHost$
GOSUB "Screen_Log_Display"
ErrLine$ = "<<Error 05>> *"+RRHost$+"* Does not Exist at end of Indicated Path! "
GOSUB "Error Log"
ErrLine$ = " "+"Attempt is being Made to Run *"+TabbyNet$+"* "
GOSUB "Error Log"
ScreenLine$="Launching TabbyNet - "+TabbyNet$
GOSUB "Screen_Log_Display"
LONG IF FileErr3%=255
ScreenLine$="TabbyNet Not Found - "+TabbyNet$
GOSUB "Screen_Log_Display"
ErrLine$ = "<<Error 06>> *"+TabbyNet$+"* Does not Exist at end of Indicated Path! "
GOSUB "Error Log"
GOSUB "Tabby_Launch_Error"
END
XELSE
RUN TabbyNet$
END
END IF
XELSE
RUN RRHost$
END
END IF
END IF
CURSOR 0
ErrLine$ = "<<Error 99>> "+" Really Big ERROR, Sequence Abort, attempting to Recover "
GOSUB "Error Log"
ScreenLine$="Launch Sequence Error, Running "+RRHost$
GOSUB "Screen_Log_Display"
LONG IF FileErr2%=255
ScreenLine$="BBS Not Found - "+RRHost$
GOSUB "Screen_Log_Display"
ErrLine$ = "<<Error 07>> "+RRHost$+" Does not Exist at end of Indicated Path! "
GOSUB "Error Log"
ErrLine$ = " "+"Attempt is being Made to Run *TabbyNet* "
GOSUB "Error Log"
ScreenLine$="Launching TabbyNet - "+TabbyNet$
GOSUB "Screen_Log_Display"
LONG IF FileErr3%=255
ScreenLine$="TabbyNet Not Found - "+TabbyNet$
GOSUB "Screen_Log_Display"
ErrLine$ = "<<Error 08>> *"+TabbyNet$+"* Does not Exist at end of Indicated Path! "
GOSUB "Error Log"
GOSUB "Tabby_Launch_Error"
END
XELSE
RUN TabbyNet$
END
END IF
RUN RRHost$
END
END IF
ON ERROR RETURN
RETURN
"Check_Valid_Filenames"
ErrFile%=0:FileErr1%=0:FileErr2%=0:FileErr3%=0
ON ERROR GOSUB "Filename_Error"
a%=1
GOSUB "Cursor_Spin"
OPEN "I",2,LaunchFile$
CLOSE #2
LONG IF FileErr1%=255
ErrLine$="<<Error 09>> *"+LaunchFile$+"* Next Event Not Found - Invalid Name or Path "
GOSUB "Error Log"
ScreenLine$="File Error <NOT FOUND> *"+LaunchFile$+"* "
GOSUB "Screen_Log_Display"
END IF
a%=2
GOSUB "Cursor_Spin"
OPEN "I",2,RRHost$
CLOSE #2
LONG IF FileErr2%=255
ErrLine$="<<Error 10>> *"+RRHost$+"* BBS Not Found - Invalid Name or Path "
GOSUB "Error Log"
ScreenLine$="File Error <NOT FOUND> *"+RRHost$+"* "
GOSUB "Screen_Log_Display"
END IF
a%=3
OPEN "I",2,TabbyNet$
CLOSE #2
GOSUB "Cursor_Spin"
LONG IF FileErr3%=255
ErrLine$="<<Error 11>> *"+TabbyNet$+"* TabbyNet Not Found - Invalid Name or Path "
GOSUB "Error Log"
ScreenLine$="File Error <NOT FOUND> *"+TabbyNet$+"* "
GOSUB "Screen_Log_Display"
END IF
ON ERROR RETURN
RETURN
"Filename_Error"
IF a%=1 THEN FileErr1%=255
IF a%=2 THEN FileErr2%=255
IF a%=3 THEN FileErr3%=255
ERROR=0
RETURN
"Get_File_Info"
ScreenLine$="Loading for Generic File"
GOSUB "Screen_Log_Display"
NextEventError%=0
a$=GenericFile$:er$="G3"
ON ERROR GOSUB "File_Error_Trap"
OPEN "I",1,GenericFile$
INPUT #1,x$
CLOSE #1
GenericFile$=x$+"Generic Import"
ON ERROR RETURN
ScreenLine$="Loading for Config File"
GOSUB "Screen_Log_Display"
a$=ConfigFile$:er$="C1"
ON ERROR GOSUB "File_Error_Trap"
OPEN "N",1,ConfigFile$
ON ERROR RETURN
GOSUB "Config_File_Read"
CLOSE #1
ScreenLine$="Checking Generic Import Size"
GOSUB "Screen_Log_Display"
a$=GenericFile$:er$="G4"
ON ERROR GOSUB "File_Error_Trap"
OPEN "R",1,GenericFile$
ON ERROR RETURN
ImportByteSize&=LOF(1,1)
CLOSE #1
' No file Found to Process - Exit/Quit
LONG IF ImportByteSize&=0
ScreenLine$="No Generic Generic Import File"
GOSUB "Screen_Log_Display"
GOSUB "Tabby_Launch"
GOSUB "Tabby_Launch_Error"
END IF
ScreenLine$="Loading User Information"
GOSUB "Screen_Log_Display"
a$=UserLog$:er$="U1"
ON ERROR GOSUB "File_Error_Trap"
OPEN "N",#6,UserLog$,136
ON ERROR RETURN
WHILE NOT EOF(6)
GOSUB "UserLog_Read"
UserRct% = UserRct%+1
IF UserRct%=2001 THEN GOTO "UserReadDone": ' Only takes first 2000 users
WEND
"UserReadDone"
CLOSE #6
UserCount%=UserRct%-1
ScreenLine$="Loading Messages Information"
GOSUB "Screen_Log_Display"
a$=MessagesFile$:er$="M4"
ON ERROR GOSUB "File_Error_Trap"
OPEN "N",1,MessagesFile$
ON ERROR RETURN
GOSUB "Read_Messages_File"
CLOSE #1
' This opens the MSGDHR File with length 206
' At this point we will determine how many records
' there are in the file
MsgHdrFilename$=MsgHdrTxtPath$+":"+"MSGHDR": ' Path to MSGHDR file
MsgTxtFilename$=MsgHdrTxtPath$+":"+"MSGTXT": ' Path to MSGTXT file
ScreenLine$="Preparing MsgHdr File"
GOSUB "Screen_Log_Display"
a$=MsgHdrFilename$:er$="H4"
ON ERROR GOSUB "File_Error_Trap"
OPEN "N",1,MsgHdrFilename$,206
ON ERROR RETURN
MSGHDRBytes&= LOF(1,1): ' Get total number of bytes
RecordCount&=(MSGHDRBytes&/206)-1: ' -1 to adjust for the Zero Record
IF RecordCount& < 0 THEN RecordCount&=0
CLOSE #1
RETURN
"Read_Messages_File"
' This routine reads in necessary information from the MESSAGE File
' NOTE: in this version message section length size would be set the
' maximum in RRH - at the writing of this that is 400 lines.
' No checks are made to insure that the body of the message does not
' exceed 400 lines. It is assumed that Tabby will regulate this.
l%=LOF(1,1)
LONG IF l% <> 9242
a$=MessagesFile$:er$="MS"
GOSUB "File_Error_Trap"
GOSUB "Tabby_Launch"
GOSUB "Tabby_Launch_Error"
END
END IF
a$=Messages$:er$="M5"
ON ERROR GOSUB "File_Error_Trap"
READ #1,PathCount$;1
READ #1,MsgHdrTxtPath$;49
READ #1,LowMessage&
READ #1,HighMessage&
READ #1,MsgTxtBytes&
' Loop here to get section types
FOR j%=1 TO 255
READ #1,SectionNameCount$;1
READ #1,MsgSectionName$;25
READ #1,SecurityLevel$;1: ' Not used here
READ #1,Modifiers$;1: ' Not used here
READ #1,MaxSectionLength%: ' Not used here - Set at Max in RRH
READ #1,RestrictionFlags&: ' Not used here
READ #1,RestrictionFlagModifier$;1: ' Not used here
READ #1,SectionType$;1
' Moves Message Identifier 0,1,2,3,4 into MessageSection$(x)
SectionType%=CVI(SectionType$)
TempHold$=STR$(SectionType%)
MessageSection$(j%)=RIGHT$(TempHold$,1)
slen%=CVI(SectionNameCount$)
MsgName$(j%)=LEFT$(MsgSectionName$,slen%)
NEXT j%
ON ERROR RETURN
' Moves valid data into MsgHdrTxtPath&
PathCount%=CVI(PathCount$)
MsgHdrTxtPath$=LEFT$(MsgHdrTxtPath$,PathCount%)
RETURN
"Config_File_Read"
a$=ConfigFile$:er$="C2"
ON ERROR GOSUB "File_Error_Trap"
READ #1, Ignore$;57
READ #1, UserLog$;41
READ #1, CallerLog$;41
READ #1, MsgPath$;80
READ #1, Ignore$;89
READ #1, LaunchTimeOld&
READ #1, Ignore$;5
READ #1, SysopName$;31
ON ERROR RETURN
LONG IF ASC(LEFT$(MsgPath$,1))>0
MessagesFile$=FN MakeString$(MsgPath$)+":MESSAGES"
XELSE
MessagesFile$=BBSFolder$+"MESSAGES": ' Default location
END IF
LONG IF ASC(LEFT$(CallerLog$,1))>0
CallerLog$=FN MakeString$(CallerLog$)+":CallerLog"
XELSE
CallerLog%=255: ' No CallerLog file being used, so can't write to it
END IF
LONG IF ASC(LEFT$(UserLog$,1))>0
UserLog$=FN MakeString$(UserLog$)+":UserLog"
XELSE
UserLog$=BBSFolder$+"UserLog": ' Default location where export is
END IF
LONG IF ASC(LEFT$(SysopName$,1))>0
SysopName$=FN MakeString$(SysopName$)
XELSE
SysopName$="System Operator"
END IF
RETURN
"File_Error_Trap"
GOSUB "Cursor_Spin"
ScreenLine$="*"+a$+"* file not found or damaged"
GOSUB "Screen_Log_Display"
GOSUB "Cursor_Spin"
ErrLine$="<<Error "+er$+">> *"+a$+"* file problems, Not found at path or damaged "
GOSUB "Error Log"
ERROR=0
GOSUB "Tabby_Launch"
GOSUB "Tabby_Launch_Error"
END
RETURN
"Screen_Log_Display"
TEXT 0,12,0,0
T%=211:L%=115:B%=227:R%=450:Temp$=ScreenLine$
CALL TEXTBOX(VARPTR(Temp$)+1,LEN(Temp$),T%, 1)
GOSUB "Cursor_Spin"
RETURN
"Error Log"
GOSUB "Cursor_Spin"
DEF OPEN "TEXTTImp"
OPEN "A",9,"Import.Error"
GOSUB "Cursor_Spin"
ErrLine$=ErrLine$+TIME$+" "+DATE$
PRINT #9, ErrLine$
CLOSE #9
RETURN
"Cursor_Spin"
Cur%=Cur%+1
IF Cur% > 131 THEN Cur%=128
CURSOR Cur%
RETURN
"Tabby_Launch_Error"
GOSUB "Cursor_Spin"
ScreenLine$="** Dropping to Finder, Launch Error **"
GOSUB "Screen_Log_Display"
ErrLine$="<<Error"+STR$(ERROR)+">> Launch Error Possible Causes are as Follows: "
GOSUB "Error Log"
ErrLine$="<<---------- BBS String - "+RRHost$+" "
GOSUB "Error Log"
ErrLine$="<<---------- BBS FolderString - "+BBSFolder$+" "
GOSUB "Error Log"
GOSUB "Cursor_Spin"
ErrLine$="<<-- Launch.Next String - "+NextLaunch$+" "
GOSUB "Error Log"
ErrLine$="<<----- TabbyNet String - "+TabbyNet$+" "
GOSUB "Error Log"
GOSUB "Cursor_Spin"
ErrLine$="<<--- BBS Folder String - "+BBSFolder$+" "
GOSUB "Error Log"
ErrLine$="<<---- Messages String - "+MessagesFile$+" "
GOSUB "Error Log"
ErrLine$="<<---- MSGHDR String - "+MsgHdrFilename$+" "
GOSUB "Error Log"
ErrLine$="<<-- One of the Above is Wrong! - Application Not There! - Invalid Pathname! - Can't Run A File! "
GOSUB "Error Log"
ErrLine$="<<---- Generic String - "+Generic$+" "
GOSUB "Error Log"
ErrLine$="* *** Dropping to Finder, I am Confuzzzzzzed @%?$-*$%! "
GOSUB "Error Log"
ERROR = 0
CURSOR 0
IF rscs%=1 THEN rscs%=0:CALL CLOSERESFILE(Refnum%)
END
RETURN
"Build_Main_Window"
GOSUB "Cursor_Spin"
IF WND=1 THEN WINDOW 1,"",(8,45)-(502,310),-17
CALL PENNORMAL
' • Draws the Main Rectangle for the % Graph
T%=10:L%=15:B%=251:R%=36
CALL FRAMERECT(T%)
' • Draws the % Break Lines on the Graph
R%=47:' • Extends the Break Lines 11 Pixels to the Right
FOR J% = T TO 250 STEP 24
CALL MOVETO(L%,J%):CALL LINETO(R%,J%)
NEXT J%
' • Draws Internal White Break Box In % Graph
T%=32:L%=22:B%=228:R%=31:PEN ,,,,19
CALL PAINTRECT(T%)
' • Draws in Percent Labels on the % Graph
TEXT 3,9,1,0: ' • Geneva, Bold, 9 pt
T%=4:L%=45:B%=16:R%=78:Percent%=100
FOR j%= 4 TO 244 STEP 24
Temp$=RIGHT$(STR$(Percent%),LEN(STR$(Percent%))-1)+"%"
T%=j%:B%=j%+12:' • Must off set the bottom value by 12
IF Percent%=0 THEN Temp$=" "+Temp$
Percent%=Percent%-10
CALL TEXTBOX(VARPTR(Temp$)+1,LEN(Temp$),T%, 1)
NEXT j%
' • Draws in the Text Headers for the current file status
TEXT 4,12,0:' • Monoco, Plain, 12pt - Need equal spaced letters
T%=23:L%=92:B%=167:R%=214
Temp$="High Message #:"+CHR$(13)+"Low Message #:"+CHR$(13)+"Last Message #:"+CHR$(13)+""+CHR$(13)+"Msgs Imported:"+CHR$(13)+"Current Msg #:"+CHR$(13)+"Total Bytes:"+CHR$(13)+""+CHR$(13)+"Bytes Per/Sec:"
CALL TEXTBOX(VARPTR(Temp$)+1,LEN(Temp$),T%,-1)
' • Backgound Black for Message Line
CALL PENNORMAL
T%=206:L%=114:B%=238:R%=460:PEN 1,1,1,8
CALL PAINTROUNDRECT(T%,16,16)
' • White Forground and Frame Message Line
GOSUB "Cursor_Spin"
T%=203:L%=111:B%=235:R%=457
PEN ,,,,19:CALL PAINTROUNDRECT(T%,16,16)
PEN ,,,,0:CALL FRAMEROUNDRECT(T%,16,16)
' • Background for Version Application Name Box
T%=20:L%=332:B%=67:R%=469
CALL PAINTROUNDRECT(T%,16,16)
' • White Forground and Frame for Version Application Name Box
T%=16:L%=329:B%=64:R%=466
PEN ,,,,19:CALL PAINTROUNDRECT(T%,16,16)
PEN ,,,,0:CALL FRAMEROUNDRECT(T%,16,16)
' • Background for Front Author Name Box
T%=45:L%=308:B%=92:R%=441
CALL PAINTROUNDRECT(T%,16,16)
' • White Forground and Frame for Author Name Box
T%=41:L%=305:B%=89:R%=438
PEN ,,,,19:CALL PAINTROUNDRECT(T%,16,16)
PEN ,,,,0:CALL FRAMEROUNDRECT(T%,16,16)
' • Background for Next Launch Application Name Box
T%=126:L%=308:B%=152:R%=456
CALL PAINTROUNDRECT(T%,16,16)
' • White Forground and Frame Next Launch Application Box
T%=123:L%=305:B%=149:R%=454
PEN ,,,,19:CALL PAINTROUNDRECT(T%,16,16)
PEN ,,,,0:CALL FRAMEROUNDRECT(T%,16,16)
' • Background for Bottom Time Box
T%=232:L%=351:B%=253:R%=438:PEN ,,,,0
CALL PAINTROUNDRECT(T%,16,16)
' • White Forground and Frame for Bottom Time Box
T%=229:L%=348:B%=250:R%=436
PEN ,,,,19:CALL PAINTROUNDRECT(T%,16,16)
PEN ,,,,0:CALL FRAMEROUNDRECT(T%,16,16)
' • Background for Top Time Box
T%=188:L%=351:B%=209:R%=438:PEN ,,,,0
CALL PAINTROUNDRECT(T%,16,16)
' • White Forground and Frame for Top Time Box
T%=185:L%=348:B%=206:R%=436
PEN ,,,,19:CALL PAINTROUNDRECT(T%,16,16)
PEN ,,,,0:CALL FRAMEROUNDRECT(T%,16,16)
TEXT 0,,:' • System Defalt font Chicage 12pt
T%=20:L%=331:B%=36:R%=464:Temp$="Import Engine 2.55"
CALL TEXTBOX(VARPTR(Temp$)+1,LEN(Temp$),T%, 1)
T%=49:L%=310:B%=81:R%=432:Temp$="Written by"+CHR$(13)+"Michael Lininger"
CALL TEXTBOX(VARPTR(Temp$)+1,LEN(Temp$),T%, 1)
T%=128:L%=306:B%=144:R%=453:Temp$="Aurora Borealis"
CALL TEXTBOX(VARPTR(Temp$)+1,LEN(Temp$),T%, 1)
TEXT 4,,: ' • Monoco. Plain, 12pt
T%=188:L%=361:B%=204:R%=419:Temp$=TIME$
CALL TEXTBOX(VARPTR(Temp$)+1,LEN(Temp$),T%, 1)
GOSUB "Cursor_Spin"
RETURN
"Get_Resource_Values"
' This module Gets default values from STR resources
' 1220 = BBS Application Name (Red Ryder Host)
' 1221 = BBS Folder Pathname (dd80:bbs:)
' 1222 = ImExport Log Full Pathname (dd80:bbs:Log:ImExport Log)
' 1223 = AreaFix Application Name (AreaFix)
' 1224 = value for Netmail Message Section Number (11)
' 1225 = value for last Message Number processed (9650)
' 1226 = Log Turned On/Off (2/1)
' 1227 = Full Log On/Off (2/1)
' 1228 = Turn on AreaFix On/Off (2/1)
ScreenLine$="Loading Resource STRs"
GOSUB "Screen_Log_Display"
' Find out what this application is named
GOSUB "Cursor_Spin"
CurApName=&H910
CurApName$=""
FOR I%=1 TO PEEK(CurApName)
CurApName$=CurApName$+CHR$(PEEK(CurApName+I%))
NEXT I%
GOSUB "Cursor_Spin"
rscs%=0:' ResFile is Closed
Refnum%=FN OPENRESFILE(CurApName$)
Errnum%=FN RESERROR
LONG IF Errnum% <> 0
ScreenLine$="Resource Problem with "+CurApName$
GOSUB "Screen_Log_Display"
ErrLine$ = "<<Error RS>> *"+CurApName$+"* has a resource fork problem, Can't Open, Find STRs "
GOSUB "Error Log"
GOSUB "Tabby_Launch"
GOSUB "Tabby_Launch_Error"
END
END IF
rscs%=1:' ResFile is Open
FOR ResourceCount%=1220 TO 1228
GOSUB "Cursor_Spin"
StrHnd&=FN GETRESOURCE(CVI("STR "),ResourceCount%)
LONG IF StrHnd&=0
' Setting up string resource to save default strs
IF ResourceCount% = 1220 THEN Str$="Red Ryder Host"
IF ResourceCount% = 1221 THEN Str$=":"
IF ResourceCount% = 1222 THEN Str$="Import Log"
IF ResourceCount% = 1223 THEN Str$="AreaFix"
IF ResourceCount% = 1224 THEN Str$="1,1"
IF ResourceCount% = 1225 THEN Str$="0"
IF ResourceCount% = 1226 THEN Str$="2"
IF ResourceCount% = 1227 THEN Str$="2"
IF ResourceCount% = 1228 THEN Str$="2"
StrHnd&=FN NEWSTRING(Str$)
CALL ADDRESOURCE (StrHnd&,CVI("STR "),ResourceCount%,"")
XELSE
StrHnd&=FN GETSTRING(ResourceCount%)
END IF
' Convert STRs into useful limit values and pathnames
Default$=FN ReturnString$(StrHnd&)
IF ResourceCount% = 1220 THEN RRHost$=Default$
IF ResourceCount% = 1221 THEN BBSFolder$=Default$
IF ResourceCount% = 1222 THEN ImExportLog$=Default$
IF ResourceCount% = 1223 THEN AreaFix$=Default$
LONG IF ResourceCount% = 1224
a%=INSTR(1,Default$,",")
NetMailArea&=VAL(LEFT$(Default$,a%-1))
EMailArea& = VAL(MID$(Default$,a%+1,3))
NetMailArea$=Default$
END IF
IF ResourceCount% = 1225 THEN OldHighMessage&=VAL(Default$):OldHighMessage$=Default$
IF ResourceCount% = 1226 THEN b3%=VAL(Default$)
IF ResourceCount% = 1227 THEN b4%=VAL(Default$)
IF ResourceCount% = 1228 THEN b5%=VAL(Default$)
NEXT ResourceCount%
RETURN
"Configure Menu"
Field%=1:CURSOR 0
WINDOW CLOSE #1
WND=1:GOSUB "Build Window"
ON DIALOG GOSUB "Handle Dialog"
DIALOG ON
"Loop"
LONG IF Button%=1
WINDOW CLOSE #1
RETURN
END IF
LONG IF Button%=2
GOSUB "Resource Update"
WINDOW CLOSE #1
RETURN
END IF
GOTO "Loop"
DIALOG OFF
"Handle Dialog"
Act%=DIALOG(0):Ref%=DIALOG(Act%)
IF Act%=3 THEN WINDOW Ref%:RETURN
LONG IF Act%=1 AND Ref%=1
Button%=2
END IF
LONG IF Act%=1 AND Ref%=2
Button%=1
END IF
LONG IF Act%=1 AND Ref%=3
LONG IF b3%=2
b3%=1
XELSE
b3%=2
END IF
BUTTON 3 ,b3%
END IF
LONG IF Act%=1 AND Ref%=4
LONG IF b4%=2
b4%=1
XELSE
b4%=2
END IF
BUTTON 4 ,b4%
END IF
LONG IF Act%=1 AND Ref%=5
LONG IF b5%=2
b5%=1
XELSE
b5%=2
END IF
BUTTON 5 ,b5%
END IF
LONG IF Act%=6 OR Act%=7
Field%=Field%+1
IF Field%>6 THEN Field%=1
EDIT FIELD #Field%
END IF
LONG IF Act%=2
EDIT FIELD #Ref%
Field%=Ref%
END IF
IF Act%=5 THEN "Format Window"
RETURN
"Frame Button"
CALL INSETRECT(T%,-4,-4): ' Expand T,L,B,R
PEN 3,3,1,8,0: ' Reset pensize
CALL FRAMEROUNDRECT(T%,16,16): ' Now frame it
CALL INSETRECT(T%,4,4):CALL PENNORMAL: ' Restore T,L,B,R
RETURN
"Build Window"
IF WND=1 THEN WINDOW 1,"Configure Menu",(27,58)-(477,273),17
GOSUB "Build Edits"
RETURN
"Format Window"
CALL PENNORMAL
LONG IF WINDOW(0)=1
T=9:L=105:B=33:R=443:PEN 1,1,1,8
CALL FRAMERECT(T)
T=43:B=67
CALL FRAMERECT(T)
T=155:L=375:B=175:R=434:GOSUB"Frame Button"
T=78:L=105:B=102:R=420
CALL FRAMERECT(T)
TEXT 0,12,0,0:T=151:L=8:B=167:R=99:TEMP$="NetMail Area:"
CALL TEXTBOX(VARPTR(TEMP$)+1,LEN(TEMP$),T, 0)
T=146:L=105:B=170:R=194
CALL FRAMERECT(T)
T=180:B=204
CALL FRAMERECT(T)
T=185:L=20:B=201:R=99:TEMP$="Last Msg #:"
CALL TEXTBOX(VARPTR(TEMP$)+1,LEN(TEMP$),T, 0)
T=83:B=99:TEMP$="Import Log:"
CALL TEXTBOX(VARPTR(TEMP$)+1,LEN(TEMP$),T, 0)
T=13:L=29:B=29:TEMP$="BBS Name:"
CALL TEXTBOX(VARPTR(TEMP$)+1,LEN(TEMP$),T, 0)
T=48:L=25:B=64:TEMP$="BBS Folder:"
CALL TEXTBOX(VARPTR(TEMP$)+1,LEN(TEMP$),T, 0)
T=112:L=105:B=136:R=420
CALL FRAMERECT(T)
T=116:L=3:B=132:R=99:TEMP$="AreaFix Name:"
CALL TEXTBOX(VARPTR(TEMP$)+1,LEN(TEMP$),T, 0)
T=184:L=220:B=200:R=349:TEMP$="Import Engine 2.55"
CALL TEXTBOX(VARPTR(TEMP$)+1,LEN(TEMP$),T, 0)
END IF
TEXT 0,12,0,0
CALL PENNORMAL
RETURN
"Build Edits"
TEXT ,,0,0
LONG IF WINDOW(0)=1
TEXT 0,12,
EDIT FIELD 1,RRHost$,(108,13)-(440,28),3,1
EDIT FIELD 2,BBSFolder$,(108,47)-(440,62),3,1
BUTTON 1 ,1," Save ",(375,155)-(434,175),1
BUTTON 2 ,1,"Cancel",(375,185)-(438,205),1
EDIT FIELD 3,ImExportLog$,(108,82)-(417,97),3,1
EDIT FIELD 4,AreaFix$,(108,116)-(417,131),3,1
EDIT FIELD 5,NetMailArea$,(108,150)-(191,165),3,1
EDIT FIELD 6,OldHighMessage$,(108,184)-(191,199),3,1
BUTTON 3 ,b3%,"Use Full Reports",(224,152)-(349,167),2
BUTTON 4 ,b4%," ",(424,82)-(448,97),2:' Activate ImportLog
BUTTON 5 ,b5%," ",(424,117)-(448,132),2:' Activate AreaFix
EDIT FIELD 1
END IF
RETURN
"Resource Update"
GOSUB "Cursor_Spin"
Rs$=EDIT$(2)
Check$=RIGHT$(Rs$,1)
LONG IF Check$ <> ":"
BBSFolder$=Rs$+":"
BEEP
Button%=0
EDIT FIELD #2,BBSFolder$
CURSOR 0
GOTO "Loop"
END IF
RCount%=0
FOR ResourceCount%=1220 TO 1225
GOSUB "Cursor_Spin"
RCount%=RCount%+1
default$ = EDIT$(RCount%)
StrHnd&=FN GETRESOURCE(CVI("STR "),ResourceCount%)
CALL SETSTRING(StrHnd&,default$)
CALL CHANGEDRESOURCE(StrHnd&)
CALL UPDATERESFILE(Refnum%)
NEXT ResourceCount%
GOSUB "Cursor_Spin"
default$ = STR$(b3%):ResourceCount%=1226
StrHnd&=FN GETRESOURCE(CVI("STR "),ResourceCount%)
CALL SETSTRING(StrHnd&,default$)
CALL CHANGEDRESOURCE(StrHnd&)
CALL UPDATERESFILE(Refnum%)
default$ = STR$(b4%):ResourceCount%=1227
StrHnd&=FN GETRESOURCE(CVI("STR "),ResourceCount%)
CALL SETSTRING(StrHnd&,default$)
CALL CHANGEDRESOURCE(StrHnd&)
CALL UPDATERESFILE(Refnum%)
default$ = STR$(b5%):ResourceCount%=1228
StrHnd&=FN GETRESOURCE(CVI("STR "),ResourceCount%)
CALL SETSTRING(StrHnd&,default$)
CALL CHANGEDRESOURCE(StrHnd&)
CALL UPDATERESFILE(Refnum%)
CURSOR 0
RETURN
"AreaFix_Launch_Error"
ErrLine$="<<Error"+STR$(ERROR)+">> *"+AreaFix$+"* AreaFix Application Not Found "
GOSUB "Error Log"
GOSUB "PrepareNextLaunch"
END
Shareware price for mantissa is $30.00.
The following is a list of features in Mantissa 3.2.
Mantissa is a message base management utility, that helps SS/Tabby
sysops maintain the high volume of echo and local mail that enter
and leave their system.
o Each message section can have a unique:
o Day limit (0-999)
o Section Limit (0-999)
o Archive Limit (0-999k)*
o Archive Location (any valid path)*
o Archives can have unique or the same archive paths*
o nonSection messages are automatically deleted*
o Global Limit Set Option*
o Global Day Limit Set Option*
o Global Archive Limit Set Option*
o Global Archive Location Set Option*
o Control 'set' Buttons for Setting unique Pathnames*
o Multiple ways to move from section to section*
o List Manager Scroll Feature*
o Popup Menus*
o Control Button Forward/Reverse*
o Menu Commands*
o Command Keys*
o On Line Help*
o Full Support of Mac Interface
o Delete by Age Only
o Delete by Limit Only
o Delete by both Age/Limit
o Master Archive On/Off switch*
o Individual Delete/Limit ON/OFF Markers*
o Renumber Messages*
o Renumber Forward from message #1*
o Renumber Reverse from high Message No.*
o Renumber Userlog, High message last read*
o Renumber on Specified Dates Only*
o Use STR's or Text file to save settings.*
o Network and Remote Maintenance supported
o Turn Mantissa Log On/Off
o Select Location and Name of Mantissa Log
o Epistle Generator
o On/Off Epistle Generator
o Max. Message Level Show Clearance
o Select location/name of Epistle Report
o Append/Erase Epistle Report
o Keep .Bak's or discard them*
o Security marker for High Clearance sections*
o Major speed boost over 1.0
o Tabby Compatible or Standalone * - New in 3.x version
In addition to Mantissa 3.2 Registered users are provided with the
updated Export 3.2. Export is a utility that is essential if you run
SS and Tabby. Export 3.2 has been greatly expanded and turbo charged.
Sysop are are given extraordinary control over data exported from their
system. Export 3.2, Probe 3.2, PreStamp 3.2 and Sundial 3.2 are only
being made available to Registered Mantissa users.
Options Available in Export 3.2:
o Point Message Support*
o Process all/new Messages*
o Delete NetMail as Processed
o Notify Sysop of Export*
o Summary of Last 5 Exports*
o Append Origin to Netmail
o D'Bridge Areafix support
o Turn Log on/off
o Select location/name of log
o Append directly to Tabby Log
o Full support of mac interface
o Use Short/Long Reports
o Node Alias for Netmail*
o Use Generic Echoes/Seenby.bbs files*
o Compatible with Origin Master (by Lance Rasmussen)
o On Line Help*
o Major speed boost over 2.52
o Erase/Append to Log* * - New in 3.x version
Utilities from, Lininger Technology:
Free to all Registered Mantissa
Versions
Export 2.54 3.2
Import 2.53 2.53 (update soon)
Sundial 2.1 3.2
PreStamp 2.0 3.2
Mantissa 1.0 (demo) 3.2
Probe .53 3.2
R.Prestamp 2.0 2.0 (update soon)
Sapphire 2.1t 2.1t (update soon)
Epistle II 1.0 1.0
TPort 1.0 1.0
*Pleiades (1) -NA- .25 (Phase 1 only)
Special thanks to,
Tom Fitzsimmons, Mark Bryant, Lance Rasmussen & Ralph Merritt
for their great ideas and for risking life and data while beta testing
the above products.
Mantissa($30.00):
Lininger Technology
Suite 'A'
385 Bowling Green Place
Gahanna, Ohio 43230
614-471-6209 226/200
Applications Freq. from 1:226/200 or 1:350/90
For General Release:
Epistle1.sit - Epistle II 1.0
Export25.sit - Export 2.54
Import25.sit - Import 2.53
Mant10.sit - Mantissa 1.0
PreStp20.sit - Prestamp 2.0
Probe.53.sit - Probe .53
RPreSt20.sit - R.Prestamp (Robot)
Sapph21t.sit - Sapphire 2.1t
Sundil21.sit - Sundial 2.1
TPort10.sit - TabbyPort 1.0
TurboT.sit - TurboPascal launch.next source (original by Pete Johnson)
ZLaunch.sit - ZBasic launch.next source code
No password required to get the above files
For Restistered Mantissa Users:
Export32.sit <password> - Export 3.21
Mant32.sit <password> - Mantissa 3.2
PreStp32.sit <password> - PreStamp 3.2
Probe32.sit <password> - Proble 3.2
Sundil32.sit <Password> - Sundial 3.2
<Password> is the first 4 uppercase characters of the filename
mentioned in your Mantissa registration cover letter
that accompanied your master disk.